package com.ctsi.ssdc.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.ctsi.ssdc.annotation.AutoId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.ZonedDateTime;

/**
 * @author ctsi-biyi-generator
*/
@ApiModel(description = "LitemallGroupon")
@TableName("litemall_groupon")
public class LitemallGroupon extends Model<LitemallGroupon> implements Serializable {
    /**
     * @Fields id 
     */
    @ApiModelProperty("")
    @AutoId(primaryKey = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value="id")
    @TableField(value="id")
    private Integer id;

    /**
     * @Fields orderId 关联的订单ID
     */
    @ApiModelProperty("orderId")
    @TableField(value="order_id")
    private Integer orderId;

    /**
     * @Fields grouponId 如果是开团用户，则groupon_id是0；如果是参团用户，则groupon_id是团购活动ID
     */
    @ApiModelProperty("grouponId")
    @TableField(value="groupon_id")
    private Integer grouponId;

    /**
     * @Fields rulesId 团购规则ID，关联litemall_groupon_rules表ID字段
     */
    @ApiModelProperty("rulesId")
    @TableField(value="rules_id")
    private Integer rulesId;

    /**
     * @Fields userId 用户ID
     */
    @ApiModelProperty("userId")
    @TableField(value="user_id")
    private Integer userId;

    /**
     * @Fields shareUrl 团购分享图片地址
     */
    @ApiModelProperty("shareUrl")
    @TableField(value="share_url")
    private String shareUrl;

    /**
     * @Fields creatorUserId 开团用户ID
     */
    @ApiModelProperty("creatorUserId")
    @TableField(value="creator_user_id")
    private Integer creatorUserId;

    /**
     * @Fields creatorUserTime 开团时间
     */
    @ApiModelProperty("creatorUserTime")
    @TableField(value="creator_user_time")
    private ZonedDateTime creatorUserTime;

    /**
     * @Fields status 团购活动状态，开团未支付则0，开团中则1，开团失败则2
     */
    @ApiModelProperty("status")
    @TableField(value="status")
    private Short status;

    /**
     * @Fields addTime 创建时间
     */
    @ApiModelProperty("addTime")
    @TableField(value="add_time")
    private ZonedDateTime addTime;

    /**
     * @Fields updateTime 更新时间
     */
    @ApiModelProperty("updateTime")
    @TableField(value="update_time")
    private ZonedDateTime updateTime;

    /**
     * @Fields deleted 逻辑删除
     */
    @ApiModelProperty("deleted")
    @TableField(value="deleted")
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    /** 
     * @return id 
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     * @return order_id 关联的订单ID
     */
    public Integer getOrderId() {
        return orderId;
    }

    /**
     * @param orderId 关联的订单ID
     */
    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    /** 
     * @return groupon_id 如果是开团用户，则groupon_id是0；如果是参团用户，则groupon_id是团购活动ID
     */
    public Integer getGrouponId() {
        return grouponId;
    }

    /**
     * @param grouponId 如果是开团用户，则groupon_id是0；如果是参团用户，则groupon_id是团购活动ID
     */
    public void setGrouponId(Integer grouponId) {
        this.grouponId = grouponId;
    }

    /** 
     * @return rules_id 团购规则ID，关联litemall_groupon_rules表ID字段
     */
    public Integer getRulesId() {
        return rulesId;
    }

    /**
     * @param rulesId 团购规则ID，关联litemall_groupon_rules表ID字段
     */
    public void setRulesId(Integer rulesId) {
        this.rulesId = rulesId;
    }

    /** 
     * @return user_id 用户ID
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * @param userId 用户ID
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /** 
     * @return share_url 团购分享图片地址
     */
    public String getShareUrl() {
        return shareUrl;
    }

    /**
     * @param shareUrl 团购分享图片地址
     */
    public void setShareUrl(String shareUrl) {
        this.shareUrl = shareUrl == null ? null : shareUrl.trim();
    }

    /** 
     * @return creator_user_id 开团用户ID
     */
    public Integer getCreatorUserId() {
        return creatorUserId;
    }

    /**
     * @param creatorUserId 开团用户ID
     */
    public void setCreatorUserId(Integer creatorUserId) {
        this.creatorUserId = creatorUserId;
    }

    /** 
     * @return creator_user_time 开团时间
     */
    public ZonedDateTime getCreatorUserTime() {
        return creatorUserTime;
    }

    /**
     * @param creatorUserTime 开团时间
     */
    public void setCreatorUserTime(ZonedDateTime creatorUserTime) {
        this.creatorUserTime = creatorUserTime;
    }

    /** 
     * @return status 团购活动状态，开团未支付则0，开团中则1，开团失败则2
     */
    public Short getStatus() {
        return status;
    }

    /**
     * @param status 团购活动状态，开团未支付则0，开团中则1，开团失败则2
     */
    public void setStatus(Short status) {
        this.status = status;
    }

    /** 
     * @return add_time 创建时间
     */
    public ZonedDateTime getAddTime() {
        return addTime;
    }

    /**
     * @param addTime 创建时间
     */
    public void setAddTime(ZonedDateTime addTime) {
        this.addTime = addTime;
    }

    /** 
     * @return update_time 更新时间
     */
    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime 更新时间
     */
    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    /** 
     * @return deleted 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * @param deleted 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LitemallGroupon other = (LitemallGroupon) that;
        return (this.getId() == null ? other.getId() == null :
				 this.getId().equals(other.getId()))
            && (this.getOrderId() == null ? other.getOrderId() == null :
				 this.getOrderId().equals(other.getOrderId()))
            && (this.getGrouponId() == null ? other.getGrouponId() == null :
				 this.getGrouponId().equals(other.getGrouponId()))
            && (this.getRulesId() == null ? other.getRulesId() == null :
				 this.getRulesId().equals(other.getRulesId()))
            && (this.getUserId() == null ? other.getUserId() == null :
				 this.getUserId().equals(other.getUserId()))
            && (this.getShareUrl() == null ? other.getShareUrl() == null :
				 this.getShareUrl().equals(other.getShareUrl()))
            && (this.getCreatorUserId() == null ? other.getCreatorUserId() == null :
				 this.getCreatorUserId().equals(other.getCreatorUserId()))
            && (this.getCreatorUserTime() == null ? other.getCreatorUserTime() == null :
				 this.getCreatorUserTime().equals(other.getCreatorUserTime()))
            && (this.getStatus() == null ? other.getStatus() == null :
				 this.getStatus().equals(other.getStatus()))
            && (this.getAddTime() == null ? other.getAddTime() == null :
				 this.getAddTime().equals(other.getAddTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null :
				 this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null :
				 this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getGrouponId() == null) ? 0 : getGrouponId().hashCode());
        result = prime * result + ((getRulesId() == null) ? 0 : getRulesId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getShareUrl() == null) ? 0 : getShareUrl().hashCode());
        result = prime * result + ((getCreatorUserId() == null) ? 0 : getCreatorUserId().hashCode());
        result = prime * result + ((getCreatorUserTime() == null) ? 0 : getCreatorUserTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }
}